# import random
# import time
# #
# # def Code():
# #     code = ''
# #     a = 0
# #     while 1:
# #         code_index = random.randrange(0,10)
# #         code += str(code_index)
# #         a += 1
# #         if a == 6:
# #             break
# #     return code
# # if __name__ == '__main__':
# #     print(Code())
#
# # 将时间变成一个十位数的字符串
# name = 'EF' + str(int(time.time()))
# print(name)
#
# a = 10
# b = 0.5
#
# if type(b) == int:
#     print(123456)
# else:
#     print(789)

import datetime

#
# # 直接使用Python内置模块datetime的格式转换功能得到结果
# def function2(year, month, day):
#     date = datetime.date(year, month, day)
#     # 返回结果
#     return int(date.strftime('%j'))
#
# if __name__ == '__main__':
#     # 捕获异常，避免输入错误直接造成程序崩溃
#     while 1:
#         try:
#             # 输入查询的信息
#             year = int(input("请输入年份:"))
#             month = int(input("请输入月份:"))
#             day = int(input("请输入日期:"))
#             # 调用函数，输出结果
#             print(function2(year, month, day))
#         except Exception as e:
#             # 输出异常
#             print("输入有误")
#             # 停止循环
#             break
import random

# 随机的16位数字
# print(str(datetime.datetime.now().strftime("%Y%m%d%H%M%S") + str(random.randint(10, 99))))


#  人工-H1902A、B期末机试题A卷/
#  成功创建会员表，优惠卷表，产品表，购物车表
#  会员表
# import time
# count = 0
# while 1:
#     time.sleep(2)
#     temp = random.uniform(1, 50)
#     print(('%.2f') % temp)
#     if count == 20:
#         print(type(temp))
#         print(type(('%.2f') % temp))
#         break
#     count += 1

# alist = [1,2,3,5,4,8,9,6,5,7,8,6,23,654,41,654,65]
# print(alist)
# alist.sort()
# blist = []
# for i in alist:
#     if i > 5.6:
#         blist.append(i)
# print(len(blist))
# a = len(alist[:int(5.4)])
# print(int(5.6))
# print(alist)
# print(a)

import time

# da = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
# aa = str(datetime.datetime.date(datetime.datetime.now())) + ' ' + '0:0:0'
# dd = datetime.datetime.now().strptime(aa,'%Y-%m-%d %H:%M:%S')
#
# cc = datetime.timedelta(days=+1)
# ee = (dd + cc)
#
# # print(aa)
# print(dd)
# print(ee)
# # print(dd)
# # print(da)
# # if aa > da:
# #     print(123)
# # else:
#     print(321)

# # 日期的加减
# today = str(datetime.datetime.date(datetime.datetime.now())) + ' ' + '0:0:0'
# today = datetime.datetime.strptime(today, '%Y-%m-%d %H:%M:%S')
# # 当前日期➕1天
# dayone = datetime.timedelta(days=+1)
# # 计算出明天日期
# tom = today + dayone

# print(today)
# print(tom)
# date_time = datetime.datetime.now() + datetime.timedelta(days=3)
# for i in range(5):
#     date_time += datetime.timedelta(minutes=3)
#     print(date_time)
#
# print(date_time)

# import datetime
# from dateutil.relativedelta import relativedelta
# print(datetime.datetime.date(datetime.datetime.now()) + relativedelta(years=1))
# print(d) # 2018-01-31 00:00:00
# print((d - relativedelta(years=1)).strftime('%Y-%m-%d')) # 20170131
# print(datetime.datetime.now() - relativedelta(months=+1))
# import requests
#
# date_time = datetime.datetime.now() + relativedelta(months=-3)
# print(date_time)
#
# #
# def geocode(address):
#     parameters = {'address': address, 'key': '6c5370a0433a13dcdf6179300fa5841e'}
#     base = 'http://restapi.amap.com/v3/geocode/geo'
#     response = requests.get(base, parameters)
#     answer = response.json()
#     if answer['count'] == '0':
#         return "error", "", "", ""
#     location = answer['geocodes'][0]['location']
#     adcode = answer['geocodes'][0]['adcode']
#     province = answer['geocodes'][0]['province']
#     qu = answer['geocodes'][0]['city']
#     district = answer['geocodes'][0]['district']
#     return location, adcode, province, qu, district
#
#
# def good():
#     add = '河北省石家庄市新华区合作街道路'
#     total = geocode(add)
#     province = total[2]
#     prov = geocode(province)
#     pcode = prov[1]
#     print(province, pcode)
#     qu = total[3]
#     q = geocode(qu)
#     qcode = q[1]
#     print(qu, qcode)
#     district = total[4]
#     dis = geocode(district)
#     dcode = dis[1]
#     print(district, dcode)
#
#
# if __name__ == '__main__':
#     # print(geocode('北京市昌平区'))
#     print(geocode('新乡市'))
#     # good()
# a = "[{'2020-05-29 09:46:57': 21}, {'2020-05-29 09:46:58': -28}, {'2020-05-29 09:46:59': -26},{'2020-05-29 09:47:00': 13}, {'2020-05-29 09:47:01': -20}, {'2020-05-29 09:47:02': 22}, {'2020-05-29 09:47:03': 3},{'2020-05-29 09:47:04': 13}, {'2020-05-29 09:47:05': 24}, {'2020-05-29 09:47:06': -23}]"
# c = []
#
# ls = []
# print(eval(a))
#
# for i in eval(a):
#     print(i)
#     for k, v in i.items():
#         b = {}
#         b['temp'] = v
#         c.append(b)
#     exit()
#
# print(c)
# start_time = '2012-05-29T19:30:03.283Z'
#
# start_time = datetime.datetime.strptime(start_time, "%Y-%m-%dT%H:%M:%S.%fZ")
# print(start_time)
# date_time = '2020-05-30 03:50:00'
# date_time = datetime.datetime.strptime(date_time, "%Y-%m-%d %H:%M:%S")
# print(date_time)
# print(date_time)
# date_time = str(datetime.datetime.now())
# print(type(date_time))
# d1 = datetime.datetime(2005, 2, 16)
# d2 = datetime.datetime(2004, 12, 31)
# di = datetime.datetime.strftime(datetime.datetime.now(),"%Y-%m-%d %H:%M:%S")
# di = datetime.datetime.strptime(di,"%Y-%m-%d %H:%M:%S")
# print(di)
# print((date_time - di).seconds)

f = open('holle.txt','w')		# 在holle.txt中写入数据，如文件不存在，则创建新文件
for i in range(5):			# for循环遍历输入5次
    f.write("holle world holle python\n")		# 输入要写入的内容
f.close()
print(f)		# 输出结果为5行显示 holle world holle python